package cn.com.nes.site.entity.vo.workOrder;

import cn.com.nes.site.entity.bo.workorder.AsyncDistributeWorkOrderInstallBO;
import cn.com.nes.site.entity.vo.BaseVO;
import lombok.Data;
import org.springframework.beans.BeanUtils;

import javax.validation.constraints.NotNull;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
 * 批量派发安装工单VO
 *
 * @Author: ShenWei
 * @Date: 2024/05/31/10:23
 */
@Data
public class BatchDistributeWorkOrderInstallVO extends BaseVO {

    /**
     * 行政区划代码
     */
    private String xzqhdm;

    /**
     * 客户id List
     */
    private List<String> customerIdList = new ArrayList<>();

    /**
     * 安装人员id
     */
    @NotNull(message = "安装人员id")
    private String maintainId;

    /**
     * 项目id
     */
    @NotNull(message = "项目id")
    private Long projectId;

    /**
     * 约定上门时间-开始
     */
    @NotNull(message = "约定上门时间-开始")
    private Date agreedDoorstepTimeStart;

    /**
     * 约定上门时间-结束
     */
    @NotNull(message = "约定上门时间-结束")
    private Date agreedDoorstepTimeEnd;

    public AsyncDistributeWorkOrderInstallBO convertToBo() {
        AsyncDistributeWorkOrderInstallBO bo = new AsyncDistributeWorkOrderInstallBO();
        BeanUtils.copyProperties(this, bo);
        return bo;
    }
}
